<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">

<ui:composition>
	<h:form>
		<rich:panel>
			<f:facet name="header">
				<h:outputText value="#{resourceApp.crmor_titulo_lista}"></h:outputText>
			</f:facet>
				
			<c:if test="${empty crmorListaBean.crmorLista}">
				<rich:panel>
					<div align="center">
					<h1><h:graphicImage value="/img/info.gif" /><h:outputLabel
						value="#{resourceApp.crmor_sin_info}" /></h1>
					</div>
				</rich:panel>
			</c:if>
			<c:if test="${!empty crmorListaBean.crmorLista}">
				
				<rich:panel>
		            
		            <h:panelGrid columns="6" width="100%" cellpadding="0" cellspacing="0">
		            	<h:panelGroup>
	                		<b><h:outputText value="#{resourceApp.crmae_sum_maemor}"></h:outputText></b>
	                	</h:panelGroup>
		            	<h:outputText value="#{crmorListaBean.crmaeDTO.suma_maemor}">
	                		<f:convertNumber currencySymbol="$" maxFractionDigits="2" type="currency"/>
	                	</h:outputText>
		            	<h:panelGroup>
	                		<b><h:outputText value="#{resourceApp.crmae_maemmp}"></h:outputText></b>
	                	</h:panelGroup>
		            	<h:outputText value="#{crmorListaBean.crmaeDTO.maemmp}"/>
		            	<h:panelGroup>
	                		<b><h:outputText value="#{resourceApp.crmae_maeemo}"></h:outputText></b>
	                	</h:panelGroup>
		            	<h:outputText value="#{crmorListaBean.crmaeDTO.maeemo}"/>		            	
		            	
		            	
		            	<h:panelGroup>
	                		<b><h:outputText value="#{resourceApp.crest_sum_estmor}"></h:outputText></b>
	                	</h:panelGroup>
		            	<h:outputText value="#{crmorListaBean.crmaeDTO.totalMorasAnioEst}">
	                		<f:convertNumber currencySymbol="$" maxFractionDigits="2" type="currency"/>
	                	</h:outputText>
		            	<h:panelGroup>
	                		<b><h:outputText value="#{resourceApp.crmor_promedio}"></h:outputText></b>
	                	</h:panelGroup>
		            	<h:outputText value="0.0"/>
		            	<h:outputText value=""/>
		            	<h:outputText value=""/>
		            	
		            	<h:panelGroup>
	                		<b><h:outputText value="#{resourceApp.crest_estmor}"></h:outputText></b>
	                	</h:panelGroup>
		            	<h:outputText value="#{crmorListaBean.crmaeDTO.totalMorasEst}">
	                		<f:convertNumber currencySymbol="$" maxFractionDigits="2" type="currency"/>
	                	</h:outputText>
		            	<h:panelGroup>
	                		<b><h:outputText value="#{resourceApp.crmor_promedio}"></h:outputText></b>
	                	</h:panelGroup>
		            	<h:outputText value="0.0"/>
		            	<h:outputText value=""/>
		            	<h:outputText value=""/>
		            	
		            </h:panelGrid>

		        </rich:panel>
				<rich:dataTable id="idTablaMoras" onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
					onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
					cellpadding="0" cellspacing="0" width="100%" border="0" value="#{crmorListaBean.crmorLista}" 
					var="mor" rows="20">		
					<rich:column sortBy="#{mor.morffh}" headerClass="encabezadoCol">
						<f:facet name="header"><h:outputText value="#{resourceApp.crmor_morffh}"></h:outputText></f:facet>
						<h:outputText value="#{mor.morffh_s}">
<!-- 							<f:convertDateTime pattern="yyyy/MM/dd" ></f:convertDateTime> -->
						</h:outputText>
					</rich:column>
					<rich:column sortBy="#{mor.crmorPK.morfec}" headerClass="encabezadoCol">
						<f:facet name="header"><h:outputText value="#{resourceApp.crmor_morfec}"></h:outputText></f:facet>
						<h:outputText value="#{mor.morfec_s}"/>
					</rich:column>
					<rich:column sortBy="#{mor.morvin}" headerClass="encabezadoCol">
						<f:facet name="header"><h:outputText value="#{resourceApp.crmor_morvin}"></h:outputText></f:facet>
						<h:outputText value="#{mor.morvin}"/>
					</rich:column>
					<rich:column sortBy="#{mor.morvlr}" headerClass="encabezadoCol">
						<f:facet name="header"><h:outputText value="#{resourceApp.crmor_morvlr}"></h:outputText></f:facet>
						<h:outputText value="#{mor.morvlr}"/>
					</rich:column>
					<rich:column sortBy="#{mor.mortas}" headerClass="encabezadoCol">
						<f:facet name="header"><h:outputText value="#{resourceApp.crmor_mortas}"></h:outputText></f:facet>
						<h:outputText value="#{mor.mortas}"/>
					</rich:column>
					<rich:column>
						<f:facet name="header"><h:outputText value="#{resourceApp.crmor_ed}"></h:outputText></f:facet>
						<h:outputText value="#{mor.edadMora}"/>
					</rich:column>
					<rich:column sortBy="#{mor.morest}" headerClass="encabezadoCol">
						<f:facet name="header"><h:outputText value="#{resourceApp.crmor_morest}"></h:outputText></f:facet>
						<h:outputText value="#{mor.morest}"/>
					</rich:column>
				</rich:dataTable>
				<rich:spacer height="30" />
				<rich:datascroller align="center"  for="idTablaMoras" maxPages="20" />
			</c:if>
      	</rich:panel>
	</h:form>
</ui:composition>
</html>
